首页> 外文OA文献 >Soft Contract Verification for Higher-Order Stateful Programs
【2h】

Soft Contract Verification for Higher-Order Stateful Programs

机译:高阶有状态程序的软合同验证

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

Software contracts allow programmers to state rich program properties usingthe full expressive power of an object language. However, since they areenforced at runtime, monitoring contracts imposes significant overhead anddelays error discovery. So contract verification aims to guarantee all or mostof these properties ahead of time, enabling valuable optimizations and yieldinga more general assurance of correctness. Existing methods for static contractverification satisfy the needs of more restricted target languages, but fail toaddress the challenges unique to those conjoining untyped, dynamic programming,higher-order functions, modularity, and statefulness. Our approach tackles allthese features at once, in the context of the full Racket system---a matureenvironment for stateful, higher-order, multi-paradigm programming with orwithout types. Evaluating our method using a set of both pure and statefulbenchmarks, we are able to verify 99.94% of checks statically (all but 28 of49, 861). Stateful, higher-order functions pose significant challenges for staticcontract verification in particular. In the presence of these features, amodular analysis must permit code from the current module to escape permanentlyto an opaque context (unspecified code from outside the current module) thatmay be stateful and therefore store a reference to the escaped closure. Also,contracts themselves, being predicates wri en in unrestricted Racket, mayexhibit stateful behavior; a sound approach must be robust to contracts whichare arbitrarily expressive and interwoven with the code they monitor. In thispaper, we present and evaluate our solution based on higher-order symbolicexecution, explain the techniques we used to address such thorny issues,formalize a notion of behavioral approximation, and use it to provide amechanized proof of soundness.
机译:软件合同允许程序员使用目标语言的全部表达能力陈述丰富的程序属性。但是,由于它们是在运行时强制执行的,因此监视合同会产生大量开销,并会延迟错误发现。因此,合同验证的目的是提前保证所有或大多数这些属性,从而实现有价值的优化并产生更一般性的正确性保证。现有的静态合同验证方法可以满足更严格的目标语言的需求,但无法解决那些与无类型,动态编程,高阶函数,模块化和有状态性相结合的挑战。在完整的Racket系统的背景下,我们的方法可以立即解决所有这些功能,这是一个成熟的环境,可以进行有状态或无类型的有状态,高阶,多范式编程。通过使用一组纯基准和有状态基准来评估我们的方法,我们能够静态地验证99.94%的检查(49个检查中的28个除外,861)。有状态的高阶功能尤其对静态合同验证提出了重大挑战。在具有这些功能的情况下,模块化分析必须允许来自当前模块的代码永久地转义到可能是有状态的不透明上下文(来自当前模块外部的未指定代码),因此存储对转义的闭包的引用。同样,契约本身(作为不受限制的球拍中的谓词)可能表现出有状态的行为;合理的方法必须对任意表达的合同和与其监视的代码交织在一起的合同具有鲁棒性。在本文中,我们提出并评估了基于高阶符号执行的解决方案,解释了用于解决此类棘手问题的技术,将行为近似的概念形式化,并提供了机械化的健全性证明。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号